package com.example.work4.po;


import java.util.Date;

public class Message {
    public Integer id;
    public String action;
    public String content;
    public int sender;
    public int receiver;
    public Date createTime;

    static public Message toMessage(com.farsunset.cim.sdk.android.model.Message p0){
        Message ans = new Message();
        ans.id = Math.toIntExact(p0.getId());
        ans.sender = Integer.parseInt(p0.getSender());
        ans.receiver = Integer.parseInt(p0.getReceiver());
        ans.content = p0.getContent();
        ans.action = p0.getAction();
        ans.createTime = new Date(System.currentTimeMillis());
        return ans;
    }
}
